package cn.java86.test;

import cn.java86.util.MybatisUtil;
import cn.java86.dao.StudentDao;
import cn.java86.entity.Student;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class QueryLimit {
    public static void main(String[] args) {
        SqlSession s= MybatisUtil.get();
        StudentDao studentDao = s.getMapper(StudentDao.class);
        List<Student> list = studentDao.search(2, 10);
        for(Student st:list){
            System.out.println(st);
        }
        MybatisUtil.close(s);
    }
}
